package com.tianpengtech.front.mobile;

import com.jfinal.config.Routes;
import com.tianpengtech.front.mobile.advertisement.MobileAdvertisementController;
import com.tianpengtech.front.mobile.bankno.MobileBanknoController;
import com.tianpengtech.front.mobile.common.intercepter.MobileRequestInterceptor;
import com.tianpengtech.front.mobile.common.intercepter.TokenCheckInterceptor;
import com.tianpengtech.front.mobile.login.MobileLoginController;
import com.tianpengtech.front.mobile.message.MobileMessageController;
import com.tianpengtech.front.mobile.moneylog.MobileMoneyLogController;
import com.tianpengtech.front.mobile.passport.MobilePassportController;
import com.tianpengtech.front.mobile.publisher.MobilePublishController;
import com.tianpengtech.front.mobile.region.MobileRegionController;
import com.tianpengtech.front.mobile.task.MobileTaskController;

/**
 * Created by ggd on 2017/7/15 0015.
 */
public class MobileRoutes extends Routes {


    @Override
    public void config() {
    	 setBaseViewPath("/WEB-INF/view");
//        addInterceptor(new MobileRequestInterceptor()); //验证请求数据有效性
        addInterceptor(new TokenCheckInterceptor()); //验证登录用户token是否有效
        add("/api",MobileLoginController.class);
        add("/api/msg",MobileMessageController.class);
        add("/api/region", MobileRegionController.class);
        add("/api/passport", MobilePassportController.class);
        add("/api/bankno", MobileBanknoController.class);
        add("/api/task", MobileTaskController.class);
        add("/api/publish", MobilePublishController.class);
        add("/api/mas",MobileAdvertisementController.class);
        add("/api/moneylog",MobileMoneyLogController.class);
    }
}
